#include "stdafx.h"
#include <cstl_capi.h>
#include <cstl/cstring.h>
#include <cstl/cvector.h> 

#ifdef __cplusplus
extern "C" NTSTATUS DriverEntry(IN PDRIVER_OBJECT pstDriverObject, IN PUNICODE_STRING  pusRegistryPath);
#endif

void SyscstlUnload(IN PDRIVER_OBJECT DriverObject)
{
	KdPrint(("the driver is unloading !!\n"));
}


NTSTATUS DriverEntry(IN PDRIVER_OBJECT pstDriverObject, IN PUNICODE_STRING  pusRegistryPath)
{
	vector_t*		pvec_coll;
	int				itIndex		= 0;
	string_t		*strData	= NULL;
	FILE			*pstFile	= NULL;

	pvec_coll = create_vector(int); 
	if(pvec_coll == NULL) 
		return -1; 
	vector_init(pvec_coll); 
	/* append elements with 1 to 6 */ 
	for(itIndex = 1; itIndex <= 6; ++itIndex) 
		vector_push_back(pvec_coll, itIndex); 
	/* print all elements followed by space */ 
	for(itIndex=0; itIndex<vector_size(pvec_coll); ++itIndex) 
		KdPrint(("%d ", *(int*)vector_at(pvec_coll, itIndex))); 
	KdPrint(("\n")); 
	vector_destroy(pvec_coll); 

	strData = create_string();
	__asm int 3;
	string_init(strData);
	pstFile = sys_fopen("\\??\\c:\\WorkBase\\123.txt","r");
	string_input(strData,pstFile);
	sys_fclose(pstFile);

	
	pstDriverObject->DriverUnload = SyscstlUnload;
	return STATUS_SUCCESS;
}

